import { defineEventHandler, getRouterParam } from 'h3';

export default defineEventHandler(async (event) => {
  const applicationId = getRouterParam(event, 'applicationId');

  // 模拟监控数据
  const monitorData = {
    cpu: Math.random() * 100,
    memory: Math.random() * 100,
    disk: Math.random() * 100,
    network: Math.random() * 50,
    timestamp: new Date().toISOString(),
  };

  return {
    code: 0,
    data: monitorData,
    msg: '获取监控数据成功',
  };
});
